//
//  ViewController.m
//  ZSSecurityUtil-master
//
//  Created by safiri on 2018/6/25.
//  Copyright © 2018年 safiri. All rights reserved.
//

#import "ViewController.h"
#import "ZSSecurityUtil.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
//    NSString *encryptStringAES1 = [ZSSecurityUtil encryptAES128ForString:@"ldios" key:@"1104941368" giv:@"207bdde75fab6n01"];
//    NSString *de = [ZSSecurityUtil decryptAES128ForString:@"IZU4sT7GbtSoC9YXsVvHpQ==" key:@"1104941368" giv:@"207bdde75fab6n01"];
    
    NSString *str = @"8920361";
    NSString *key = @"7GbtIUDG";
    NSString *ivDES = @"pegldoes";
    
//    NSString *str = @"ZSSecurityUtil-master";
//    NSString *key = @"2231443r";
//    NSString *ivDES = @"rew321";

    
    NSString *encryptStringDES = [ZSSecurityUtil encryptDESForString:str key:key gIv:ivDES];
    NSLog(@"encryptStringDES = %@",encryptStringDES);
    NSString *decryptStringDES = [ZSSecurityUtil decryptDESForString:@"lME3B9Lc/6I=" key:key gIv:ivDES];
    NSLog(@"decryptStringDES = %@",decryptStringDES);
    
    NSString *encryptString3DES = [ZSSecurityUtil encrypt3DESForString:@"8920361" key:key gIv:ivDES];
    NSLog(@"encryptString3DES = %@",encryptString3DES);
    NSString *decryptString3DES = [ZSSecurityUtil decrypt3DESForString:@"0DKClotsSHE=" key:key gIv:ivDES];
    NSLog(@"decryptString3DES = %@",decryptString3DES);
    
//
    NSString *strAES = @"ZSSecurityUtil-master";
    NSString *keyAES = @"2231443r23fgwyip";
    NSString *ivAES = @"1372039298920361";
    NSString *encryptStringAES = [ZSSecurityUtil encryptAES128ForString:strAES key:keyAES giv:ivAES];
    NSLog(@"encryptStringAES = %@",encryptStringAES);
    NSString *decryptStringAES = [ZSSecurityUtil decryptAES128ForString:encryptStringAES key:keyAES giv:ivAES];
    NSLog(@"decryptStringAES = %@",decryptStringAES);
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
